<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\UserCoupon
 *
 * @property int $id
 * @property int|null $conpon_id
 * @property int|null $user_id
 * @property int|null $staus 0 未使用 1 已经使用 2 已过期
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property string|null $start_time
 * @property string|null $end_time
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereConponId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereEndTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereStartTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereStaus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserCoupon whereUserId($value)
 * @mixin \Eloquent
 * @property-read \App\Coupon $coupon
 */
class UserCoupon extends Model
{
    protected $table='user_coupons';
    public function coupon(){
        return $this->hasOne('App\Coupon','id','conpon_id');
    }
}
